﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LibraryModels;
using System.Data;

namespace LibraryIDAL
{
    /// <summary>
    /// InterfaceName: ITabBookType
    /// Auther:Leo.wl
    /// Time:2010-04-14
    /// 接口层ITabBookType 的摘要说明。
    /// </summary>
    public  interface ITabBookType
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(int TypeID);
        /// <summary>
        /// 增加一条数据
        /// </summary>
        int Add(TabBookType model);
        /// <summary>
        /// 更新一条数据
        /// </summary>
        int Update(TabBookType model);
        /// <summary>
        /// 删除一条数据
        /// </summary>
        int Delete(int TypeID);
        /// <summary>
        /// 查询所有类型信息(查询图书类型用到,带搜索)
        /// </summary>
        /// <param name="message">查询信息</param>
        /// <returns>数据集</returns>
        DataSet GetAllBookType(string message);
        /// <summary>
        /// 根据图书类型ID获取图书类型
        /// </summary>
        /// <param name="TypeId">图书类型编号</param>
        /// <returns></returns>
        DataSet GetRoomByTypeId(int TypeId);
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        TabBookType GetModel(int TypeID);
        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetList(string strWhere);
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        DataSet GetList(int Top, string strWhere, string filedOrder);
        /// <summary>
        /// 根据分页获得数据列表
        /// </summary>
        DataSet GetList(string fldStr, string strWhere, int PageIndex, int PageSize, string keyFld, string strSort, int isGetCount, string tableName);
        #endregion  成员方法
    }
}
